User setting information management method and management system for portable telephone

ABSTRACT

In a user setting information management method, when a predetermined event occurs, user setting information stored in the built-in memory of a portable telephone is read out and saved in a backup flash memory. When the predetermined event is canceled, the user setting information saved in the flash memory is written in the built-in memory of the portable telephone. The flash memory is divided into a plurality of independently erasable blocks. Each divided block is divided into a user setting information area for writing user setting information to be backed up and a block management area for writing block management information for each block. A user setting information log representing a backup order is generated as block management information for each block. Pieces of block management information of all blocks are compared every occurrence of a predetermined event to identify a block having undergone oldest backup and a block having undergone newest backup. After data in the block having undergone oldest backup is erased, data is backed up in the erased block. Block management information of the erased/backup block is written in the block having undergone newest backup. A user setting information management system is also disclosed.

BACKGROUND OF THE INVENTION

[0001] The present invention relates to a user setting informationmanagement method and management system which manage backup processingof, when a predetermined event occurs, generating a trigger foractivating a backup program, reading out user setting information storedin the built-in memory of a portable telephone, saving it in a backupFROM, and when the event which has generated the trigger is canceled,writing the user setting information saved in the FROM in the built-inmemory of the portable telephone.

[0002] In current portable telephones, information such as a telephonebook input by the user is stored in an SRAM (Static Random AccessMemory). The SRAM allows free read/write as its feature. However, theSRAM cannot hold data when the backup battery of the portable telephoneis dead. If the backup battery is dead, data input by the user is lost,and the user must input them again.

[0003] To solve this problem, a flash EEPROM (Electrically ErasableProgrammable Read Only Memory) is used for the memory dial of theportable telephone. The flash memory is nonvolatile, enables electricalwrite/erase, consumes small power, and provides a shorter access timethan that of a hard disk. Data is backed up using an FROM which surelyholds data. This prevents loss of data caused by a dead backup battery.

[0004] Japanese Patent Laid-Open No. 2000-115346 discloses a backupdevice using an FROM. The backup device disclosed in this reference isdirectly connected to the data communication connector of a portabletelephone via a connector, and receives power from the portabletelephone. Under the control of a single-chip microcomputer, the backupdevice reads out telephone number data from the portable telephone viathe connector, stores it in the FROM, and writes telephone number datastored in the FROM into the portable telephone. The portable telephoneis notified by a communication means of the end of reading out telephonenumber data from the portable telephone and writing telephone numberdata in the portable telephone.

[0005] Since the backup device receives power from the portabletelephone, the backup device itself can be reduced in size and weightand can be carried together with the portable telephone.

[0006] This backup device is convenient when backup operation isnormally performed. However, the FROM allows write of data from bit “1”to bit “0”, but does not allow write from bit “0” to bit “1”. Unlike theSRAM, the FROM does not support partial overwrite. To write data inwhich bits “1” and “0” irregularly appear, like user information data,new data cannot be written in the FROM unless existing data is erased.

[0007] Owing to this characteristic of the FROM, the latest data of theSRAM is also lost upon power-off when old backup data in the FROM iserased in order to back up the latest data in the SRAM. In this case,the latest data accumulated in the SRAM is also completely lost togetherwith the old backup data in the FROM. Thus, the data cannot bereconstructed.

SUMMARY OF THE INVENTION

[0008] It is an object of the present invention to provide a usersetting information management method and management system capable ofpreventing loss of data even upon power-off of an SRAM when data in anFROM is erased.

[0009] To achieve the above object, according to the present invention,there is provided a user setting information management methodcomprising the steps of, when a predetermined event occurs, reading outuser setting information stored in a built-in memory of a portabletelephone to save the user setting information in a backup flash memory,and when the predetermined event is canceled, writing the user settinginformation saved in the flash memory in the built-in memory of theportable telephone, the save step having the steps of dividing the flashmemory into a plurality of independently erasable blocks, dividing eachdivided block into a user setting information area for writing usersetting information to be backed up and a block management area forwriting block management information for each block, generating a usersetting information log representing a backup order as block managementinformation for each block, comparing pieces of block managementinformation of all blocks every occurrence of a predetermined event toidentify a block having undergone oldest backup and a block havingundergone newest backup, after data in the block having undergone oldestbackup is erased, backing up data in the erased block, and writing blockmanagement information of the erased/backup block in the block havingundergone newest backup.

BRIEF DESCRIPTION OF THE DRAWINGS

[0010]FIG. 1 is a block diagram showing a user setting informationmanagement system according to the first embodiment of the presentinvention;

[0011]FIG. 2 is a view showing the block management area of an FROMshown in FIG. 1;

[0012]FIG. 3 is a flow chart showing FROM backup processing executed bya CPU in FIG. 1 upon power-off;

[0013]FIG. 4 is a flow chart showing SRAM expansion processing executedby the CPU in FIG. 1 upon power-on; and

[0014]FIGS. 5A to 5D are views for explaining user setting informationmanagement procedures in a user setting information management systemaccording to the second embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] The present invention will be described in detail with referenceto the accompanying drawings.

[0016]FIG. 1 shows a user setting information management systemaccording to the first embodiment of the present invention. In FIG. 1, aportable telephone 10 comprises an SRAM 20 for storing user settinginformation such as a telephone book, an FROM 30 for backing upinformation of the SRAM 20, and a CPU (Central Processing Unit) 40 forperforming various control operations including information backup.

[0017] The memory area of the FROM 30 is divided into two independentlyerasable blocks 1 and 2. The blocks 1 and 2 are respectively constitutedby user setting information areas 11 and 21 for backing up user settinginformation, and block management areas 12 and 22 in which managementinformation is written for each block. The CPU 40 comprises a blockidentification unit 41 for identifying the information save logs of theblocks 1 and 2, an information save unit 42 for saving user settinginformation, and a management unit 43 for managing block managementinformation.

[0018] In the following description, the block number is designated by k(k=1, 2), and areas in each block (user setting information area forbacking up user setting information, and block management area) aredesignated by p (p=1, 2). In this case, p=1 means an area for backing upuser setting information, and p=2 means a block management area. The parea of the k block is expressed by kp. The area 12 represents the blockmanagement area of the block 1, and the area 21 represents the usersetting information area (to be referred to as a backup areahereinafter) of the block 2.

[0019] The block management area k2 (k=1, 2) of each block storesinformation about the use status, the erase status of the backup area,and the data log, as shown in FIG. 2. The “use status” means the usestatus of an erased backup area, i.e., the progress of write processingof writing backup data from the SRAM. In the first embodiment, the usestatus is expressed by upper two digits and lower two digits of a4-digit hexadecimal number, as shown in Table 1. TABLE 1 Upper Lower UseStatus FF FF Unused FF 00 During write 00 00 Effective (end of write)

[0020] In Table 1, “unused” is a state wherein data has been erased anddata representing a use state such as “during write” or “effective” isnot written. “Effective” means that write is completed without anytrouble and written data can be used as backup data. The use status isgiven as 32-bit data because all bits in an unused state (erased state)are “1” (all “FF”) as the characteristic of a flash memory. In addition,data can only be written in units of 32 bits.

[0021] The erase status represents the progress of erase processing fora target block. The erase status is expressed by three stages: “unused”,“during erase”, and “end of erase” as shown in Table 2. TABLE 2 UpperLower Use Status FF FF Unused FF 00 During erase 00 00 End of erase

[0022] The data log is data for managing the data order of backup data,and is incremented from “0001h” to “FFFEh” every write. “FFFEh” means anunused state, and “0001h” means the first written state. After “FFFEh”,the data log returns to “0001h”.

[0023] Block management data of the block 2 is written in the blockmanagement area 12 of the block 1, and block management data of theblock 1 is written in the block management area 12 of the block 2. Thisis because block management according to the present invention is tomanage erase of each block and write of backup data after erase. Theblock management area of a block to be erased does not allow writingerase/write information of this block.

[0024] The CPU 40 of the portable telephone 10 copies user settinginformation from the SRAM 20 to an older one (subjected to backup atearlier time) of the two blocks as a target backup block that is judgedfrom the data log of the FROM 30 upon power-off. Upon power-on, the CPU40 expands, in the user setting information area of the SRAM 20, usersetting information accumulated in a newer one (subjected to latestbackup) of the two blocks that is judged from the data log of the FROM.

[0025] The operation of the user setting information management systemhaving this arrangement will be explained with reference to FIGS. 3 and4.

[0026] FROM backup processing executed by a backup program activated bypower-off will be described. A case wherein an “older” block is theblock 1 on the basis of the data logs of the two blocks 1 and 2 in theFROM will be described. At time when the backup program is activated,block management information of the block 2 is saved in the blockmanagement area 12 of the block 1, but the block management area 22 ofthe newer block 2 is unused. This is because the block management area22 is cleared by erase processing executed before user settinginformation is newly backed up in the block 2.

[0027] Backup data is saved in the older block, i.e., block 1. Blockmanagement information about erase and backup of the block 1 is writtenin the block management area 22 (currently unused) of the block 2. Inthis manner, information is backed up in the older block because, evenif backup fails due to power-off before the completion of backup that iscaused by removal of a battery during backup, the latest backup datasaved in the newer block 2 can be used.

[0028] In FIG. 3, if power-off is detected (YES in step S1), the blockidentification unit 41 of the CPU 40 determines that the block 1 is anolder block, and starts backup processing for the block 1 (step S2). TheCPU 40 writes “FF00” representing “during erase” in the erase statusfield of the block management area 22 of the block 2 (step S3). If writeof “during erase” is completed (YES in step S4), the CPU 40 erases datain the block 1 (step S5). If erase is completed (YES in step S6), theCPU 40 writes “0000” representing “end of erase” in the erase statusfield of the block management area 22 (step S7). If write of “end oferase” is completed (YES in step S8), the CPU 40 writes “start of write”in the use status field of the block management area 22 (step S9).

[0029] If write is completed (YES in step S10), the information saveunit 42 of the CPU 40 writes data of the SRAM in the user settinginformation area 11 of the block 1 (step S11). If data write iscompleted (YES in step S12), the management unit 43 of the CPU 40 writes“0000” representing “effective (end of write)” in the use status fieldof the block management area 22, and writes the number of backupoperations counted up by “1” in a data log field (step S13). If write of“effective” and write of the data log are completed (YES in step S14),backup processing ends.

[0030] SRAM expansion processing upon power-on will be described. A casewherein the block 1 is a newer block on the basis of the data logs ofthe two blocks in the FROM will be described. The block 1 is determinedto be a “newer” one as a result of backup processing shown in FIG. 3. Atthis time, the block management area 12 of the block 1 is unused becauseof erase processing executed on the initial stage of backup processing.

[0031] In FIG. 4, if the CPU 40 of the portable telephone 10 determinesthat the power supply is turned on (step S21), it reads out the usestatus of the block management area 22 (step S22). If the use status ofthe block management area 22 is “0000” representing “effective” (end ofwrite) (YES in step S23), the CPU 40 expands data of the user settinginformation area 11 of the block 1 in the SRAM 20 (step S24). If NO instep S23, the CPU 40 expands data of the user setting information area21 of the block 2 in the SRAM 20 (step S25). Then, SRAM expansionprocessing upon power-on ends.

[0032] According to the first embodiment, when a backup program istriggered, data in a block having undergone backup processing at earliertime is erased, and backup processing is executed for this block. Evenif this backup processing fails, user setting information saved in ablock having undergone latest backup processing can be used. Even ifbackup fails, user setting information is not lost.

[0033] Backup may be performed not only upon power-off but also at thestart of charge. In this case, even a portable telephone which is hardlyturned off by the user can back up user setting information such as atelephone book.

[0034] The second embodiment of the present invention will be described.In the first embodiment, the number k of blocks =2. In the secondembodiment, the number k of blocks is increased to an arbitrary integern (n>k). Also in this embodiment, the block management area of eachblock has the same format as that shown in FIG. 2. However, contentswritten in each field are expanded.

[0035] In the first embodiment, data in an “older” block (to be referredto as a first block) of two blocks is erased, and backup data is writtenin this block. At time when the backup data is written, the blockmanagement area of the first block is unused. After backup, the firstblock becomes a “newer” block, and has the user setting information areanewly storing the backup data and the unused block management area. Thesecond block, which has first been a “newer” block, becomes an “older”block after the backup data is written in the first block.

[0036] The next erase processing is performed for the second block, andblock management information in the second block is written in the blockmanagement area (currently unused) of the first block.

[0037] This description is adopted for the number k of blocks=n asfollows.

[0038] In the second embodiment, data in the “oldest” block (to bereferred to as a first block) among n blocks is erased, and backup datais written in this block. At time when the backup data is written, theblock management area of the first block is unused. After backup, thefirst block becomes the “newest” block, and has the user settinginformation area newly storing the backup data and the unused blockmanagement area. The second block, which has first been the “newest”block, becomes the second newest block after the backup data is writtenin the first block.

[0039] The next erase processing is performed for the currently oldestblock, and block management information in the currently oldest block iswritten in the block management area (currently unused) of the firstblock which is the currently newest block.

[0040]FIGS. 5A to 5D show the concept of the second embodiment for k=4.In FIGS. 5A to 5D, user setting information areas k1 (k=1 to 4) ofblocks #1 to #4 store their user setting information, and blockmanagement areas k2 (k=1 to 4) store block management information ofblocks other than themselves. For example, in FIG. 5A, user settinginformation of the block #1 is written in the user setting informationarea k1 of the block #1, and block management information of the block#2 is written in the block management area k2 of the block #1.

[0041] A, B, C, and D represent the “newness” of the blocks. Blocks oncolumn A are the oldest (blocks having undergone erase and backupfirst), and blocks on column D are the newest. Since the blockmanagement area k2 of the latest block is unused and blank. T1, T2, T3,and T4 represent times at which erase and backup are executed (power-offtimes).

[0042] At time T1, the block #4 is the newest, and the block #1 is theoldest, as shown in FIG. 5A. Pieces of block management information ofthe blocks #2, #3, and #4 are written in the block management areas k2of the blocks #1, #2, and #3, the reason of which will be apparent fromthe following description.

[0043] At time T2, the power supply is turned off. Data in the block #1which is the oldest at time T1 is erased, block management informationwritten in its block management area k2 is also erased, and the blockmanagement area k2 becomes unused, as shown in FIG. 5B. Then, usersetting information of the block #1 is written from an SRAM 20 in theuser setting information area k1 of the block #1. This backup processingmakes the block #1 the newest block. Block management information aboutthe block #1 in this processing is written in the block management areak2 of the block #4 which is unused at time T1.

[0044] By power-off at time T2, the block #1 becomes the newest block(block management area k2 is blank), and the block #4 storing the blockmanagement information about the block #1 becomes the second newestblock. In accordance with this, the blocks #3 and #2 become olderblocks.

[0045] The same processing is done when the power supply is turned offat times T3 and T4 (FIGS. 5C and 5D). By power-off operations at timesT1 to T4, pieces of block management information are written in theblock management areas k2 of the blocks #1 to #4, as shown in FIGS. 5Ato 5D.

[0046] Even when backup processing fails due to any reason during backupprocessing for the block #1 upon power-off at time T2, the user settinginformation saved in the second newest block #4 can be supplied to theSRAM 20 after power-on.

[0047] As has been described above, according to the present invention,an FROM is alternately used between multiple planes (multiple blocks),and user setting information is backed up on one plane of the flashmemory upon power-off. Even if backup to this plane fails, user settinginformation saved in another plane can be used. As a result, usersetting information can be securely held.

[0048] When a predetermined event such as power-off occurs, a backupprogram is automatically activated. User setting information can bestored in the FROM without user's consciousness of backup. Hence, usersetting information can be reliably held against a dead backup batteryof which the user is unconscious.

What is claimed is:
 1. A user setting information management methodcomprising the steps of: when a predetermined event occurs, reading outuser setting information stored in a built-in memory of a portabletelephone to save the user setting information in a backup flash memory;and when the predetermined event is canceled, writing the user settinginformation saved in the flash memory in the built-in memory of theportable telephone, the save step having the steps of: dividing theflash memory into a plurality of independently erasable blocks; dividingeach divided block into a user setting information area for writing usersetting information to be backed up and a block management area forwriting block management information for each block; generating a usersetting information log representing a backup order as block managementinformation for each block; comparing pieces of block managementinformation of all blocks every occurrence of a predetermined event toidentify a block having undergone oldest backup and a block havingundergone newest backup; after data in the block having undergone oldestbackup is erased, backing up data in the erased block; and writing blockmanagement information of the erased/backup block in the block havingundergone newest backup.
 2. A method according to claim 1, wherein themethod further comprises the step of counting the number of backupoperations for each block, and the identification step includes thesteps of: determining a block exhibiting the smallest number of backupoperations as a block having undergone oldest backup; and determining ablock exhibiting the largest number of backup operations as a blockhaving undergone newest backup.
 3. A method according to claim 1,wherein the predetermined event includes power-off of the built-inmemory of the portable telephone.
 4. A method according to claim 1,wherein the predetermined event includes start of power charge of theportable telephone.
 5. A user setting information management systemcomprising: a built-in memory which is incorporated in a portabletelephone and stores user setting information; a flash memory in whichthe user setting information of said built-in memory is backed up; andprocessing control means for, when a predetermined event occurs, savingthe user setting information stored in said built-in memory of theportable telephone in said flash memory, and when the predeterminedevent is canceled, writing the user setting information saved in saidflash memory in said built-in memory of the portable telephone, whereinsaid flash memory is divided into a plurality of independently erasableblocks, each divided block is divided into a user setting informationarea for writing user setting information to be backed up and a blockmanagement area for writing block management information including auser setting information log representing a backup order for each block,and said processing control means includes: block identification meansfor comparing pieces of block manage information of all blocks everyoccurrence of a predetermined event to identify a block having undergoneoldest backup and a block having undergone newest backup; informationsave means for erasing data in the block having undergone oldest backupand backing up data in the erased block; and management means forwriting block management information of the erased/backup block in theblock having undergone newest backup.
 6. A system according to claim 5,wherein said identification means determines a block exhibiting thesmallest number of backup operations as a block having undergone oldestbackup for each block, and determines a block exhibiting the largestnumber of backup operations as a block having undergone newest backup.7. A system according to claim 5, wherein the predetermined eventincludes power-off of said built-in memory of the portable telephone. 8.A system according to claim 5, wherein the predetermined event includesstart of power charge of the portable telephone.
 9. A system accordingto claim 5, wherein the block management area includes a first fieldrepresenting a data log, a second field representing pr ogress of erasefor a block during erase/backup, and a third field representing progressof backup performed after completion of erase.